//
//  BaseRefreshController.h
//  CharonTVProject
//
//  Created by karong on 2023/6/6.
//

#import "BaseListViewController.h"
#import "BaseRefreshRequest.h"

NS_ASSUME_NONNULL_BEGIN
@protocol RefreshResultProtocol <NSObject>

@optional

@property (nonatomic, strong) NSMutableArray *dataArray;

/// 有下拉動画刷新
- (void)benginRefresh;
/// 無下来動画刷新
- (void)refreshData;
///加载更多
- (void)loadMoreData;

- (void)loadSuccessWithArray:(NSArray *)array isRefresh:(BOOL)isRefresh;
- (void)loadFailedWithError:(NSError *)error;
- (void)loadCompleteWithArray:(NSArray *)array;

@end

@interface BaseRefreshController : BaseListViewController <RefreshResultProtocol>

@property (nonatomic, strong) BaseRefreshRequest *request;

- (MJRefreshAutoNormalFooter *)refreshFooter;
- (void)analysisError:(NSError *)error;

@end

NS_ASSUME_NONNULL_END
